# Find ncurses
find_path(NCURSES_INCLUDE_DIR ncurses.h /usr/include /usr/local/include)
find_library(NCURSES_LIBRARY ncurses /usr/lib/ /usr/local/lib)

if(NCURSES_INCLUDE_DIR AND NCURSES_LIBRARY)
  set(NCURSES_FOUND TRUE)
endif(NCURSES_INCLUDE_DIR AND NCURSES_LIBRARY)

if(NCURSES_FOUND)
  message(STATUS "Found ncurses: ${NCURSES_LIBRARY}")
else(NCURSES_FOUND)
  message(FATAL_ERROR "ncurses not found!")
endif(NCURSES_FOUND)
